{config_load file=global.conf section="dbgrid"}


{assign var=count_col value=1}



<table id="db_grid_{$id}" border="0" width="100%" cellspacing="0" cellpadding="0" vspace="2" hspace="2">
  <tr>
    <td colspan="5" bgcolor="{#caption_bgcolor#}"><font size="+1" color="{#caption_color#}">{$title}</font>    </td>
  </tr>


  {include file="admins/lang/grid_header.tpl"}

  <tr>

    <td colspan="5" align="center" >
     <script language="javascript" src="{#scripts_dir#}/tables.js" ></script>

     <table id="grid_{$grid.id}" border="0" cellspacing="1" cellpadding="1" vspace="0" hspace="0" bgcolor="{#border_color#}" width="98%" >
      <tr bgcolor="{#title_bgcolor#}">
{section name=fld loop=$grid.fields}
 { if 1==$grid.fields[fld].visible }
   <td align="center">

         <b> {$grid.fields[fld].caption} </b>

   </td>


  {assign var=count_col value="`$count_col+1`"}

 {/if}
{/section}


<td> &nbsp; </td>
  </tr>


<form name="frm_bag" class="form" method="post">
   <input type="hidden" name="data_operation" value="edit">
{section name=row loop=$grid.data}

      <tr>
  {section name=fld loop=$grid.data[row]}

    { if 1==$grid.fields[fld].visible }
      <td {if $grid.fields[fld].align} align="{$grid.fields[fld].align}" {/if}>{$grid.data[row][fld]}</td>
    {/if}
    {if 'label_text'==$grid.fields[fld].name}
      {assign var=label_text value=`$grid.data[row][fld]`}
    {/if}
  {/section}
  <td  align="center">
    {*<input  type="text" size="50" name="data_const_id__{$grid.data[row].fid}" value="{$label_text}">*}
    <textarea rows="4" cols="50" name="data_const_id__{$grid.data[row].fid}">{$label_text}</textarea>
  </td>

      </tr>
{/section}
<tr>
 <td colspan="{$count_col-1}" align="right">&nbsp;</td>
 <td align="center">
   <input name="btn_sbmt" type="submit" value="OK">
   <input name="btn_reset" type="reset" value="Cancel">
 </td>
</tr>
</form>
 </table>


     </td>

  </tr>
  {include file="admins/lang/grid_footer.tpl"}

 </table>
<script language="javascript">
 <!--//
  tigra_tables("grid_{$grid.id}", 1, 1, "{#tbl_str_odd_color#}", "{#tbl_str_even_color#}", "{#tbl_str_mover_color#}", "{#tbl_str_onclick_color#}");
 // -->
</script>
